package com.d3works.apps.baml.xml;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import org.apache.commons.lang3.StringEscapeUtils;

@XmlType
public abstract class BaseTaskNode extends BaseNode {

  @XmlAttribute(name = "target")
  private String target;

  @XmlAttribute(name = "expression")
  private String expression;

  public String getTarget() {
    return target;
  }

  public String getExpression() {
    if (expression == null) {
      return null;
    }
    return StringEscapeUtils.unescapeXml(expression);
  }
}
